home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / ggraph / RCS / ggraphstruct.h,v < prev    next >
Text File  |  1989-07-12  |  4KB  |  118 lines

  1. head     1.1;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.1
  10. date     89.07.12.01.40.51;  author douglis;  state Exp;
  11. branches ;
  12. next     ;
  13.  
  14.  
  15. desc
  16. @baseline from monet (?)
  17. @
  18.  
  19.  
  20.  
  21. 1.1
  22. log
  23. @Initial revision
  24. @
  25. text
  26. @#include "ggraph.h"
  27.  
  28. /****************************************************************
  29.  *    All the structures used globaly by ggraph        *
  30.  *                                *
  31.  ****************************************************************/
  32.  
  33. /* The generic text structure used for all text structures on the graph */
  34. struct gtext{            /* text for the graph */
  35.     int t_type;            /* type of thing this is */
  36.     int t_font;            /* font to use */
  37.     int t_size;            /* size to use */
  38.     int t_just;            /* justification to use */
  39.     float t_xpos;        /* X connection point in user coord */
  40.     float t_ypos;        /* Y connection point in user coord */
  41.     float t_vertsz;        /* vertical size of text in dev coord */
  42.     float t_hortsz;        /* horizontal size of text in dev coord */
  43.     int t_text[80];        /* text string */
  44. };
  45.  
  46. /* The frame structure used for all frames  */
  47. struct frame{            /* a frame for something */
  48.     int    frame_type;        /* what is it for */
  49.     int     fsize;        /* thickness of frame */
  50.     float   frame1x, frame1y;    /* one corner of the frame */
  51.     float   frame2x, frame2y;    /* one corner of the frame */
  52.     float   frame3x, frame3y;    /* one corner of the frame */
  53.     float   frame4x, frame4y;    /* one corner of the frame */
  54. };
  55.  
  56. /* A line on the graph and its properties */
  57. struct aline {
  58.     struct aline *forw_line;/* pointer to next line */
  59.     struct aline *back_line;/* pointer to prev line */
  60.     int     lonoff;        /* is this line visible */
  61.     int     llabsw;        /* line label on/off */
  62.     int     ctype;        /* curve type to use */
  63.     int     ltype;        /* brush type to use */
  64.     int     lthick;        /* brush thickness to use */
  65.     int     lsize;        /* line size to use */
  66.     int     mtype;        /* type of mark for points */
  67.     int     maxpoint;    /* max number of points this line */
  68.     float   maxx, maxy;    /* maximum coordinate values for line */
  69.     float   minx, miny;    /* minimum coordinate values for line */
  70.     float   xpoints[MAXSIZE]; /* X coordinates in user coords */
  71.     float   ypoints[MAXSIZE]; /* Y coordinates in user coords */
  72.     char    lname[20];    /* user name of line */
  73.     struct gtext llabel;    /* line label */
  74.     struct gtext llelabel;    /* line legend label */
  75.     };
  76.  
  77. /* A graph and its properties */
  78. struct agraph{
  79.     struct aline *lines[MAXLINES];
  80.     int     maxlines;        /* number of datasets in plot */
  81.     int     axline_type;    /* type of line for axis */
  82.     int     xgrid_type;        /* type of line for X grid */
  83.     int     ygrid_type;        /* type of line for Y grid */
  84.     int        yvert;        /* should we do vertical chars */
  85.     int        xpreci1, xpreci2;    /* precision for X labels */
  86.     int        ypreci1, ypreci2;    /* precision for Y labels */
  87.     int     maxtickx, maxticky;    /* maximum value of X and Y ticks on axis */
  88.     int     mintickx, minticky;    /* minimum value of X and Y ticks on axis */
  89.     int     numtickx, numticky;    /* count of X and Y ticks on axis */
  90.     float   xplotmax, yplotmax;    /* plot area */
  91.     float   logxtick, logytick;    /* tick factor for log graphs */
  92.     float   xoffset, yoffset;   /* offsets for coordinates */
  93.     float   dtickx, dticky;    /* delta for ticks */
  94.     float   stickx, sticky;    /* starting value for ticks */
  95.     float   scalex, scaley;    /* scaling factor for graph */
  96.     float   xorigin, yorigin;    /* the origin of the graph */
  97.     float   gmaxx, gmaxy;    /* maximum coordinate values for line */
  98.     float   gminx, gminy;    /* minimum coordinate values for line */
  99.     float   xcenter, ycenter;    /* center of each axis */
  100.     float   symbolsz;        /* pixel size for symbols */
  101.     int     gtype;        /* type of graph */
  102.     int     logxsw, logysw;    /* switches for log axis */
  103.     int     firstxsw, firstysw;    /* switches for log axis */
  104.     struct frame gframe;    /* graph frame */
  105.     struct frame lframe;    /* legend frame */
  106.     struct gtext gtitle;    /* title for graph */
  107.     struct gtext xlabel;    /* label for X axi */
  108.     struct gtext ylabel;    /* label for Y axis */
  109.     struct gtext xtick;        /* tick for X axis */
  110.     struct gtext ytick;        /* tick for Y axis */
  111.     struct gtext legend;    /* lengend title */
  112.     int graph_units;            /* type of units graph is specifed in */
  113.     int xaxis_length;        /* length of x axis in inches */
  114.     int yaxis_length;        /* length of y axis in inches */
  115. };
  116.  
  117. @
  118.